#include "bounding.hh"

#include "../raycaster/ray.hh"

BoundingSphere::BoundingSphere (int radius):
  radius_ (radius)
{
}


bool
BoundingSphere::dispatch (const Vector3f& pos, Ray* ray) const
{
  return ray->intersect (pos, this);
}

int
BoundingSphere::radius () const
{
  return radius_;
}

BoundingBox::BoundingBox (const Vector3f& size):
  size_ (size)
{
}

bool
BoundingBox::dispatch (const Vector3f& pos, Ray* ray) const
{
  return ray->intersect (pos, this);
}

const Vector3f&
BoundingBox::size () const
{
  return size_;
}
